/*
 * Copyright 2010 Daniel Kurka
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

@if user.agent safari {

@if mgwt.os blackberry {
	
	.display {
		position: relative;
		min-width: 100%;	
 	}
 
	.displayContainer {
 		position: relative;
		min-width: 100%;
	}
	
} @else {


	.displayContainer {
 		position: absolute;
		width: 100%;
		height: 100%;
		overflow:hidden;
	}
 
	@if mgwt.os iphone {
 		.displayContainer{
 			
 		}	
	} @elif mgwt.os ipad {
 		.displayContainer{
 			
 		}
	}@else {

 		
 	}
 	
 	.display {
		position: absolute;
		top: 0px;
		left: 0px;
		right: 0px;
		bottom: 0px;
		overflow:hidden;
			
	}
 	

 	@if mgwt.os iphone ipad retina ipad_retina {
		 .display {
		    \-webkit-transform-style: preserve-3d;
		    \-webkit-backface-visibility: hidden;
		    \-webkit-transform: translate3d(0,0,0) rotate(0) scale(1);
		}
	}
	
	@if mgwt.os iphone ipad retina {
		 .display {
			\-webkit-perspective: 800;
		}
	}
	
	@if mgwt.os desktop {
		 .display {
			\-webkit-perspective: 800;
		    \-webkit-backface-visibility: hidden;
		}
	}
}
 


 








@if user.agent safari {
	
	
	
	/**    
key frame for doing nothing
*/
@-webkit-keyframes donothing {
    from { opacity: 0.9; }
    to { opacity: 1; }
}
	


.in, .out {
	\-webkit-animation-timing-function: ease-in-out;
	\-webkit-animation-duration: 300ms;
	\-webkit-animation-fill-mode: both;
}

.in {
	z-index:10;
}

.out{
	z-index: 0 !important;
}

.slide.in {
	\-webkit-animation-name: slideinfromright;
	
}

.slide.out {
	\-webkit-animation-name: slideouttoleft;
}

.slide.in.reverse {
	\-webkit-animation-name: slideinfromleft;
	
}

.slide.out.reverse {
	\-webkit-animation-name: slideouttoright;
}

@-webkit-keyframes slideinfromright {
    from { -webkit-transform: translateX(100%); }
    to { -webkit-transform: translateX(0); }
}

@-webkit-keyframes slideinfromleft {
    from { -webkit-transform: translateX(-100%); }
    to { -webkit-transform: translateX(0); }
}

@-webkit-keyframes slideouttoleft {
    from { -webkit-transform: translateX(0); }
    to { -webkit-transform: translateX(-100%); }
}

@-webkit-keyframes slideouttoright {
    from { -webkit-transform: translateX(0); }
    to { -webkit-transform: translateX(100%); }
}


.flip {
	\-webkit-animation-duration: .65s;
	\-webkit-backface-visibility: hidden;
}

.flip.in {
	\-webkit-animation-name: flipinfromleft;
}

.flip.out {
	\-webkit-animation-name: flipouttoleft;
}

.flip.in.reverse {
	\-webkit-animation-name: flipinfromright;
}

.flip.out.reverse {
	\-webkit-animation-name: flipouttoright;
}

@-webkit-keyframes flipinfromright {
    from { -webkit-transform: rotateY(-180deg) scale(.8); }
    to { -webkit-transform: rotateY(0) scale(1); }
}

@-webkit-keyframes flipinfromleft {
    from { -webkit-transform: rotateY(180deg) scale(.8); }
    to { -webkit-transform: rotateY(0) scale(1); }
}

@-webkit-keyframes flipouttoleft {
    from { -webkit-transform: rotateY(0) scale(1); }
    to { -webkit-transform: rotateY(-180deg) scale(.8); }
}

@-webkit-keyframes flipouttoright {
    from { -webkit-transform: rotateY(0) scale(1); }
    to { -webkit-transform: rotateY(180deg) scale(.8); }
}

@-webkit-keyframes fadein {
    from { opacity: 0; }
    to { opacity: 1; }
}

@-webkit-keyframes fadeout {
    from { opacity: 1; }
    to { opacity: 0; }
}

.fade.in {
	z-index: 10;
	\-webkit-animation-name: fadein;
}
.fade.out {
	z-index: 8;
	\-webkit-animation-name: fadeout;
}

.dissolve.in {
	\-webkit-animation-name: fadein;
}

.dissolve.out {
	\-webkit-animation-name: fadeout;	
}





.slideup.in {
	\-webkit-animation-name: slideupfrombottom;
	z-index: 10;
}

.slideup.out {
	\-webkit-animation-name: slideupfrommiddle;
	z-index: 0;
}

.slideup.out.reverse {
	z-index: 10;
	\-webkit-animation-name: slidedownfrommiddle;
}

.slideup.in.reverse {
	z-index: 0;
	\-webkit-animation-name: slidedownfromtop;
}


@-webkit-keyframes slideupfrombottom {
    from { -webkit-transform: translateY(100%); }
    to { -webkit-transform: translateY(0); }
}

@-webkit-keyframes slidedownfrommiddle {
    from { -webkit-transform: translateY(0); }
    to { -webkit-transform: translateY(100%); }
}

@-webkit-keyframes slideupfrommiddle {
    from { -webkit-transform: translateY(0); }
    to { -webkit-transform: translateY(-100%); }
}

@-webkit-keyframes slidedownfromtop {
    from { -webkit-transform: translateY(-100%); }
    to { -webkit-transform: translateY(0%); }
}


.swap {
	\-webkit-transform: perspective(800);
	\-webkit-animation-duration: .7s;
}
.swap.out {
	\-webkit-animation-name: swapouttoleft;
}
.swap.in {
	\-webkit-animation-name: swapinfromright;
}
.swap.out.reverse {
	\-webkit-animation-name: swapouttoright;
}
.swap.in.reverse {
	\-webkit-animation-name: swapinfromleft;
}


@-webkit-keyframes swapouttoright {
    0% {
        -webkit-transform: translate3d(0px, 0px, 0px) rotateY(0deg);
        -webkit-animation-timing-function: ease-in-out;
    }
    50% {
    
        -webkit-transform: translate3d(-180px, 0px, -400px) rotateY(20deg);
        -webkit-animation-timing-function: ease-in;
        opacity: 0.8;
       
    }
    100% {
        -webkit-transform:  translate3d(0px, 0px, -800px) rotateY(70deg);
         opacity: 0;
    }
}

@-webkit-keyframes swapouttoleft {
    0% {
        -webkit-transform: translate3d(0px, 0px, 0px) rotateY(0deg);
        -webkit-animation-timing-function: ease-in-out;
    }
    50% {
        -webkit-transform:  translate3d(180px, 0px, -400px) rotateY(-20deg);
        -webkit-animation-timing-function: ease-in;
        opacity: 0.8;
    }
    100% {
        -webkit-transform: translate3d(0px, 0px, -800px) rotateY(-70deg);
        opacity: 0;
    }
}

@-webkit-keyframes swapinfromright {
    0% {
        -webkit-transform: translate3d(0px, 0px, -800px) rotateY(70deg);
        -webkit-animation-timing-function: ease-out;
    }
    50% {
        -webkit-transform: translate3d(-180px, 0px, -400px) rotateY(20deg);
        -webkit-animation-timing-function: ease-in-out;
    }
    100% {
        -webkit-transform: translate3d(0px, 0px, 0px) rotateY(0deg);
    }
}

@-webkit-keyframes swapinfromleft {
    0% {
        -webkit-transform: translate3d(0px, 0px, -800px) rotateY(-70deg);
        -webkit-animation-timing-function: ease-out;
    }
    50% {
        -webkit-transform: translate3d(180px, 0px, -400px) rotateY(-20deg);
        -webkit-animation-timing-function: ease-in-out;
    }
    100% {
        -webkit-transform: translate3d(0px, 0px, 0px) rotateY(0deg);
    }
}





/****************************
*	Pop in animation
*****************************/


.pop.in {
	\-webkit-animation-name: popin;
}

.pop.out {
	\-webkit-animation-name: popout;
}



@-webkit-keyframes popin {
    from {
        -webkit-transform: scale(.3);
        opacity: 0;
    }
    to {
        -webkit-transform: scale(1);
        opacity: 1;
    }
}

@-webkit-keyframes popout {
    from {
        -webkit-transform: scale(1);
        opacity: 1;
    }
    to {
        -webkit-transform: scale(.3);
        opacity: 0;
    }
}

} 

}



